package com.alick.third_push.jpush;

import android.content.Context;

import cn.jpush.android.api.JPushInterface;
import common.utils.BLog;
import com.alick.third_push.PushDebug;

/**
 * 功能:
 * 作者: 崔兴旺
 * 日期: 2017/11/28
 * 备注:
 */
public class JPushHelper {
    private static JPushHelper instance = null;

    private JPushHelper() {
    }

    public static JPushHelper getInstance() {
        if (instance == null) {
            synchronized (JPushHelper.class) {
                if (instance == null) {
                    instance = new JPushHelper();
                }
            }
        }
        return instance;
    }

    public void init(Context context) {
        JPushInterface.init(context);
        JPushInterface.setDebugMode(PushDebug.IS_DEBUG);
        BLog.i("极光推送注册成功,注册ID:" + JPushInterface.getRegistrationID(context));
    }
}
